<template>
  <div class="container">
    <!-- 面包屑导航 -->
    <div class="breadcrumb">
      <el-breadcrumb separator="">
        <el-breadcrumb-item>
          <div class="div1">基本配置</div>
        </el-breadcrumb-item>
        <el-breadcrumb-item>
          <div class="div2">员工列表</div>
        </el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <!-- 面包屑导航 -->
    <div class="Box">
      <div class="table_tab">
        <div class="inquiry">
          <div class="headerbox">
            <div class="header">
              <div class="title_left"></div>
              员工
            </div>
            <div class="headerbox_right">
              <el-button size="mini" type="primary" @click="refresh()"
                >刷新</el-button
              >
              <el-button size="mini" @click="back()">返回</el-button>
            </div>
          </div>
          <div class="headerTitle">数据筛选</div>
          <el-form
            :inline="true"
            ref="queryForm"
            :model="queryForm"
            label-width=""
            size="mini"
          >
            <el-form-item label="昵称">
              <el-input
                placeholder="请输入"
                clearable
                v-model="queryForm.reallyName"
              ></el-input>
            </el-form-item>
            <el-form-item label="工作手机号">
              <el-input
                placeholder="请输入"
                clearable
                v-model="queryForm.workPhone"
              ></el-input>
            </el-form-item>
            <el-form-item label="手机号">
              <el-input
                placeholder="请输入"
                clearable
                v-model="queryForm.phoneNumber"
              ></el-input>
            </el-form-item>
            <el-form-item label="旧五域账号">
              <el-input
                placeholder="请输入"
                clearable
                v-model="queryForm.oldAccount"
              ></el-input>
            </el-form-item>
            <el-form-item label="工号">
              <el-input
                placeholder="请输入"
                clearable
                v-model="queryForm.serial"
              ></el-input>
            </el-form-item>
            <el-form-item label="部门">
              <el-cascader
                @change="handleSelectOrgId"
                v-model="queryForm.orgId"
                :options="options"
                :show-all-levels="false"
                :props="{
                  checkStrictly: true,
                  label: 'orgName',
                  value: 'orgCode',
                  children: 'children',
                }"
                clearable
                filterable
              ></el-cascader>
            </el-form-item>
            <el-form-item label="职位">
              <el-select
                @change="handleSelectPositionId"
                v-model="queryForm.positionId"
                placeholder="请选择"
                clearable
              >
                <el-option
                  v-for="items in positionList"
                  :key="items.id"
                  :label="items.name"
                  :value="items.id"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="角色">
              <el-select
                @change="handleSelectRoleId"
                v-model="queryForm.roleId"
                placeholder="请选择"
                clearable
              >
                <el-option
                  v-for="items in roleDataList"
                  :key="items.id"
                  :label="items.name"
                  :value="items.id"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="在职">
              <el-select
                @change="handleSelectStatus"
                v-model="queryForm.status"
                placeholder="请选择"
                clearable
              >
                <el-option
                  v-for="items in statusList"
                  :key="items.id"
                  :label="items.dictName"
                  :value="items.dictId"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item>
              <el-button
                @click="searchEvent('search')"
                plain
                v-on:keyup.enter="searchEvent('search')"
                type="primary"
                >搜索</el-button
              >
              <el-button plain @click="reset()" type="primary">重置</el-button>
            </el-form-item>
          </el-form>
        </div>
        <div class="inquiryTab">
          <div class="tabTitle">员工列表</div>
          <div class="table">
            <el-table
              border
              :data="tableData.list"
              :header-cell-style="{ background: '#f8f8f8' }"
              style="width: 100%"
              align="center"
            >
              <el-table-column label="昵称" min-width="120" prop="reallyName">
                <template slot-scope="props">
                  <p class="btnp" @click="toInfo(props.row)">
                    {{ props.row.reallyName }}
                  </p>
                </template>
              </el-table-column>
              <el-table-column
                label="工作手机号"
                prop="workPhone"
                min-width="120"
              >
              </el-table-column>
              <el-table-column
                label="手机号"
                prop="phoneNumber"
                min-width="120"
              ></el-table-column>
              <el-table-column label="工号" min-width="100">
                <template slot-scope="props">
                  <span>{{ props.row.serial }}</span>
                </template>
              </el-table-column>
              <el-table-column
                label="性别"
                prop="sexLabel"
                min-width="50"
              ></el-table-column>
              <el-table-column
                label="部门"
                prop="orgName"
                min-width="80"
              ></el-table-column>
              <el-table-column
                label="职位"
                prop="positionName"
                width="100"
              ></el-table-column>
              <el-table-column width="150" label="角色">
                <template slot-scope="props">
                  <p v-for="item in props.row.roleName" :key="item.index">
                    {{ item }}
                  </p>
                </template>
              </el-table-column>
              <el-table-column
                width="150"
                label="旧五域账号"
                prop="oldAccount"
              ></el-table-column>
              <el-table-column
                width="200"
                label="最后更新时间"
                prop="updatedTime"
              ></el-table-column>
              <el-table-column width="90" label="在职状态" prop="status">
                <template slot-scope="props">
                  <p
                    :class="
                      props.row.status == 'A'
                        ? 'green'
                        : '' || props.row.status == 'S'
                        ? 'red'
                        : '' || props.row.status == 'X'
                        ? 'gray'
                        : ''
                    "
                  >
                    {{
                      props.row.status == "A"
                        ? "在职"
                        : "" || props.row.status == "S"
                        ? "离职"
                        : "" || props.row.status == "X"
                        ? "删除"
                        : ""
                    }}
                  </p>
                </template>
              </el-table-column>

              <el-table-column label="操作" width="150" fixed="right">
                <template slot-scope="props">
                  <p class="btnp" @click="toInfo(props.row)">查看</p>
                  <p
                    v-if="parArray.indexOf('setPass') != -1"
                    class="btnp"
                    @click="setPassword(props.row)"
                  >
                    设置密码
                  </p>
                  <p
                    v-if="parArray.indexOf('ygPhone') != -1"
                    class="btnp"
                    @click="setPhone(props.row)"
                  >
                    设置工作手机号
                  </p>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </div>
      </div>
    </div>
    <!-- 分页start -->
    <div class="page" v-if="tableData.totalNum > 0">
      <div class="block">
        <el-pagination
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="pageNo"
          :page-sizes="[10, 20, 50, 100, 200]"
          :page-size="pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="tableData.totalNum"
          prev-text="上一页"
          next-text="下一页"
        >
        </el-pagination>
      </div>
    </div>
    <!-- 分页end -->

    <!-- 查看信息对话框 -->
    <el-dialog
      title="基本信息"
      :close-on-click-modal="false"
      append-to-body
      :visible.sync="toInfoDialogVisible"
      width="30%"
      :before-close="handleCloseToInfo"
    >
      <el-form ref="form" size="mini" :model="form" label-width="100px">
        <el-form-item label="昵称">
          <el-input :disabled="true" v-model="form.reallyName"></el-input>
        </el-form-item>
        <el-form-item label="工作手机号">
          <el-input :disabled="true" v-model="form.workPhone"></el-input>
        </el-form-item>
        <el-form-item label="手机号">
          <el-input :disabled="true" v-model="form.phoneNumber"></el-input>
        </el-form-item>
        <el-form-item label="工号">
          <el-input :disabled="true" v-model="form.serial"></el-input>
        </el-form-item>
        <el-form-item label="性别">
          <el-input :disabled="true" v-model="form.sexLabel"></el-input>
        </el-form-item>
        <el-form-item label="部门">
          <el-input :disabled="true" v-model="form.orgName"></el-input>
        </el-form-item>
        <el-form-item label="职位">
          <el-input :disabled="true" v-model="form.positionName"></el-input>
        </el-form-item>
        <el-form-item label="角色">
          <el-input :disabled="true" v-model="form.roleName"></el-input>
        </el-form-item>
        <el-form-item label="旧五域账号">
          <el-input :disabled="true" v-model="form.oldAccount"></el-input>
        </el-form-item>
        <el-form-item label="在职状态">
          <el-input
            :disabled="true"
            v-model="form.statusLabel"
            :class="[
              statusColor == 'A'
                ? 'greenStatus'
                : '' || statusColor == 'X'
                ? 'redStatus'
                : '' || statusColor == 'S'
                ? 'grayStatus'
                : '',
            ]"
          ></el-input>
        </el-form-item>
      </el-form>
    </el-dialog>
    <!-- 查看信息对话框结束 -->
    <!-- 设计密码对话框 -->
    <el-dialog
      title="设置密码"
      :close-on-click-modal="false"
      append-to-body
      :visible.sync="setPasswordDialogVisible"
      width="30%"
      :before-close="handleCloseSetPassword"
    >
      <el-form
        ref="formPass"
        :rules="rulesSetPass"
        :model="formPass"
        label-width="100px"
      >
        <el-form-item label="设置密码" prop="setPasswordDate">
          <el-input
            type="password"
            placeholder="请输入密码"
            v-model="formPass.setPasswordDate"
          ></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="setPasswordDialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="setPasswordConfirm('formPass')"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <!-- 设计密码对话框结束 -->
    <!-- 设置工作手机号对话框 -->
    <el-dialog
      title="设置工作手机号"
      :close-on-click-modal="false"
      append-to-body
      :visible.sync="setPhoneDialogVisible"
      width="30%"
      :before-close="handleCloseSetPhone"
    >
      <el-form
        ref="ruleForm"
        :rules="rulesSetPhone"
        :model="ruleForm"
        label-width="130px"
      >
        <el-form-item label="设置工作手机号" prop="setPhoneDate">
          <el-input
            placeholder="设置工作手机号"
            autocomplete="off"
            v-model="ruleForm.setPhoneDate"
          ></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="setPhoneDialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="setPhoneConfirm('ruleForm')"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <!-- 设置工作手机号对话框结束-->
  </div>
</template>

<script>
import VDistpicker from "v-distpicker";
export default {
  watch: {
    setPhoneDialogVisible (val) {
      console.log(val)
      if (val == false) {
        this.ruleForm.setPhoneDate = ""
      }
    },
    setPasswordDialogVisible (val) {
      console.log(val)
      if (val == false) {
        this.formPass.setPasswordDate = ""
      }
    },
  },
  components: {
    VDistpicker,
  },
  data () {

    // 自定义输入框正则校验
    var checkPhone = (rule, value, callback) => {
      console.log(value);
      const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
      if (!Number.isInteger(+value)) {
        callback(new Error("请输入数字值"));
      } else {
        if (phoneReg.test(value)) {
          callback();
        } else {
          callback(new Error("电话号码格式不正确"));
        }
      }
    };
    // var validatePass = (rule, value, callback) => {
    //   const reg = /^[a-zA-Z]\w{5,32}$/;
    //   if (value === "") {
    //     callback(new Error("请输入密码"));
    //   } else {
    //     if (reg.test(value)) {
    //       callback();
    //     } else {
    //       callback(new Error("密码以字母开头 长度在6~32之间 只能包含字母、数字和下划线"));
    //     }
    //   }
    // };
    // 自定义输入框正则校验结束

    return {
      toInfoDialogVisible: false,//查看 详情对话框
      setPasswordDialogVisible: false,//设置密码对话框
      setPhoneDialogVisible: false,//设置工作手机号
      date: "",
      // filterText: "",
      position: [
        {
          label: "正常",
          value: 'A'
        },
        {
          label: "停用",
          value: 'S'
        },
        {
          label: "删除",
          value: 'X'
        }
      ],


      queryForm: {
        orgId: "",
        reallyName: "",
        workPhone: '',
        phoneNumber: "",
        oldAccount: "",
        serial: "",
        positionId: "",
        roleId: "",
        status: "",

      },
      form: {
        reallyName: "",
        workPhone: "",
        phoneNumber: "",
        serial: "",
        sexLabel: "",
        orgName: "",
        positionName: "",
        roleName: "",
        oldAccount: "",
        statusLabel: "",

      },
      pageNo: 1,
      pageSize: 10,
      tableData: [],
      options: [],
      statusList: [],
      tree: [],
      // defaultProps: {
      //     children: "children",
      //     label: "orgName",
      // },
      orgCode: "",
      roleVisible: false, //分配角色弹框
      authority: "",
      roleCont: [],
      limits: "",
      parArray: [],
      btnloading: false,
      employeeId: "",
      height: "500px",
      ruleForm: {
        setPhoneDate: "",//设置工作手机号

      },
      formPass: {
        setPasswordDate: "",//设置密码

      },
      rulesSetPhone: {
        setPhoneDate: [
          { validator: checkPhone, trigger: "blur" }
        ],
      },
      rulesSetPass: {
        setPasswordDate: [
          { required: true, message: '请输入密码', trigger: 'blur' },
          { min: 6, max: 32, message: '长度在 6 到 32 个字符', trigger: 'blur' }
        ],
      },
      passwordId: "",//设置密码需要的id
      PhoneID: "",//设置手机号需要的id
      positionList: "",//职位列表数据
      roleDataList: "",//角色下拉数据列表
      statusColor: "",
    };
  },
  mounted () {
    let self = this;
    let ph = document.documentElement.clientHeight;
    self.height = ph - 350 + "px";
    window.onresize = function () {
      let ph = document.documentElement.clientHeight;
      self.height = ph - 350 + "px";
    };
  },
  created () {
    this.getStaffList();
    this.getPositionList()
    this.getRoleList()

    this.department();
    this.statusData();

    // 权限设定判断
    this.limits = JSON.parse(sessionStorage.getItem('limit'))
    const params = this.limits.buttonTreeDto.filter(
      (item) => item.menuCode === 'staffListCode'
    )
    params[0].buttonList.forEach((item) => {
      this.parArray.push(item.code)
    })
    console.log(this.parArray)
    // 权限设定判断
    document.onkeydown = (e) => {
      let key = window.event.keyCode;
      if (key == 13) {
        this.searchEvent();
      }
    };
  },
  beforeRouteLeave (to, form, next) {
    document.onkeydown = null;
    next();
  },

  methods: {
    handleSelectStatus (e) {
      console.log(e)
      this.queryForm.status = e;
      this.getStaffList('search')

    },
    handleSelectPositionId (e) {
      console.log(e)
      this.queryForm.positionId = e;
      this.getStaffList('search')
    },
    handleSelectRoleId (e) {
      console.log(e)
      this.queryForm.roleId = e;
      this.getStaffList('search')
    },
    handleSelectOrgId (e) {
      console.log(e)
      this.queryForm.orgId = e
      this.getStaffList('search')
    },
    // 查询职位下拉列表数据
    getPositionList () {
      const data = {
      }
      this.$api.staffListSelect(data).then((res) => {
        if (res.code == 0) {
          this.positionList = res.data
        }
        console.log(res)
      }).catch((err) => { console.log(err) })
    },
    getStaffList (type) {
      const data = {
        orgId: this.queryForm.orgId[this.queryForm.orgId.length - 1],
        reallyName: this.queryForm.reallyName,
        workPhone: this.queryForm.workPhone,
        phoneNumber: this.queryForm.phoneNumber,
        oldAccount: this.queryForm.oldAccount,
        serial: this.queryForm.serial,
        positionId: this.queryForm.positionId,
        roleId: this.queryForm.roleId,
        status: this.queryForm.status,
        pageNo: this.pageNo,
        pageSize: this.pageSize,
      }
      if (type === 'search') {
        this.pageNo = 1
        data.pageNo = 1
      }
      this.$api.staffPageList(data).then((res) => {
        if (res.code == 0) {
          this.tableData = res.data
        }
        console.log(res)
      }).catch((err) => { console.log(err) })
    },
    // 刷新
    refresh () {
      this.queryForm = {}
      this.queryForm.orgId = ""
      this.getStaffList()
      this.getPositionList()
      this.$forceUpdate();
    },
    // 返回
    back () {
      this.$router.go(-1)
    },
    filterNode (value, data) {
      if (!value) return true;
      return data.orgName.indexOf(value) !== -1;
    },
    // 查看基本信息
    toInfo (row) {
      console.log(row)
      this.toInfoDialogVisible = true;
      this.form.reallyName = row.reallyName
      this.form.workPhone = row.workPhone
      this.form.phoneNumber = row.phoneNumber
      this.form.serial = row.serial
      this.form.sexLabel = row.sexLabel
      this.form.orgName = row.orgName
      this.form.positionName = row.positionName

      this.form.roleName = row.roleName.toString()
      this.form.oldAccount = row.oldAccount
      this.form.statusLabel = row.statusLabel
      this.statusColor = row.status
      console.log(this.form.roleName)

    },
    // 设置密码
    setPassword (row) {
      this.passwordId = row.id
      console.log(row)
      this.setPasswordDialogVisible = true;
    },
    // 设置密码确定按钮
    setPasswordConfirm (formName) {
      console.log(formName)
      this.$refs[formName].validate((valid) => {
        if (valid) {
          const data = {
            userId: this.passwordId,
            password: this.formPass.setPasswordDate
          }
          this.$api.staffUpdatePassword(data).then(res => {
            console.log(res)
            if (res.code == 0) {
              this.$message.success("设置成功！")
              this.setPasswordDialogVisible = false
              this.getStaffList()

            } else {
              this.$message.error("设置失败！")
            }
          })
        } else {
          console.log('error submit!!');
          return false;
        }
      });

    },
    // 设置工作手机号确定按钮
    setPhoneConfirm (formName) {
      console.log(formName)
      this.$refs[formName].validate((valid) => {
        if (valid) {
          const data = {
            userId: this.PhoneID,
            workPhone: this.ruleForm.setPhoneDate
          }
          this.$api.staffUpdateWorkPhone(data).then(res => {
            console.log(res)
            if (res.code == 0) {
              this.$message.success("设置成功！")
              this.setPhoneDialogVisible = false
              this.getStaffList()
            } else {
              this.$message.error("设置失败！")
            }
          })
        } else {
          console.log('error submit!!');
          return false;
        }
      });
    },
    // 设置工作手机号
    setPhone (row) {
      console.log(row)
      this.PhoneID = row.id
      this.setPhoneDialogVisible = true;
    },
    // 关闭弹框
    handleCloseToInfo () {
      this.toInfoDialogVisible = false
    },
    handleCloseSetPassword () {
      this.setPasswordDialogVisible = false
    },
    handleCloseSetPhone () {
      this.setPhoneDialogVisible = false
      this.setPhoneDate = ""
    },
    // 关闭弹框结束
    pzRole (row) {
      this.employeeId = row.id;
      this.axios
        .get("/sys/v1/user/employee/get/role?employeeId=" + this.employeeId, {
          headers: {
            isLoading: false,
          },
        })
        .then((res) => {
          // console.log(res);
          if (res.code == 0) {
            this.authority = res.data;
          }
        });
    },
    is_null (content) {
      if (content) {
        return false;
      } else {
        return true;
      }
    },
    // handleCurrentChange(val) {
    // 	this.staiffList(`${val}`, this.orgCode);
    // },
    // 分页
    handleCurrentChange (val) {
      this.pageNo = val;
      this.getStaffList(this.orgCode);
    },
    handleSizeChange (val) {
      this.pageSize = val;
      this.getStaffList(this.orgCode);
    },
    // 部门选择列表
    department () {
      this.axios
        .post(
          "/sys/v1/org/tree/select",
          {
            request: {
              orgName: "",
              orgType: "",
            },
            version: "",
          },
          {
            headers: {
              isLoading: false,
            },
          }
        )
        .then((res) => {
          console.log(res);
          if (res.code == 0) {
            this.options = res.data;
            const userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
            this.queryForm.orgId = userInfo.orgCodes
          } else {
            this.$message.error(res.message);
          }
        });
    },
    // 部门选择列表
    /***是否正常下拉框的数据请求***/
    statusData () {
      this.axios
        .get("/sys/v1/common/by/group?groupId=employee_status", {
          headers: {
            isLoading: false,
          },
        })
        .then((res) => {
          // console.log("是否正常下拉框的数据请求")
          // console.log(res);
          if (res.code == 0) {
            this.statusList = res.data;
          } else {
            this.$message.error(res.message);
          }
        });
    },
    // 角色下拉列表数据
    getRoleList () {
      const data = {
        pageNo: 1,
        pageSize: 10000
      }
      this.$api.rolePageList(data).then(res => {
        console.log(res)
        if (res.code == 0) {
          this.roleDataList = res.data.list
        } else {
          this.$message.error(res.message);
        }
      })
    },
    /***是否正常下拉框的数据请求***/
    /***重置搜索***/
    reset () {
      this.queryForm = {}
      this.queryForm.orgId = ""
      this.pageSize = 10;
      this.pageNo = 1;
      this.getStaffList();
    },
    /***搜索模拟数据***/
    searchEvent (type) {
      console.log(this.queryForm)
      // this.pageSize = 10;
      // this.pageNo = 1;
      this.getStaffList(type)
    },
    /***搜索模拟数据***/


  },
};
</script>

<style scoped lang="scss">
.div1 {
  margin-left: -16px;
  background: url(../../../assets/breadcrumb2.png);
  width: 120px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  color: #2d7edf;
}

.div2 {
  margin-left: -16px;
  background: url(../../../assets/breadcrumb1.png);
  width: 120px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  color: #fff;
}

// .container{
// 	width: 100%;
// 	// overflow-x:scroll;
// 	// background: #F5F5F5;
// }

.el-menu-vertical-demo {
  width: 200px;
  overflow-y: scroll;
  height: 700px;
}

.el-menu-input {
  padding: 0 15px;
  background: #fff;

  /deep/ .el-input__inner {
    height: 30px;
    border: 1px solid #eee;
    margin: 10px 0;
  }
}

.el-menu-vertical-demo::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.btnp {
  display: inline-block;
  vertical-align: middle;
  padding: 0 10px;
  color: #0083ef;
}

.btnp:hover {
  color: #4168e7;
  cursor: pointer;
}

.addPerson {
  margin-top: 20px;
  padding: 10px 15px;
}

.Box {
  display: flex;
  justify-content: flex-start;
  width: 100%;

  .table_tab {
    width: 100%;
    margin-bottom: 50px;
  }
}

.table {
  border-radius: 5px;
  width: 100%;
}

/deep/.distpicker-address-wrapper select {
  padding: 0rem 0.75rem;
  height: 30px;
  line-height: 30px;
  font-size: 15px;
}

/deep/ .expanded {
  background: #f5f7fa;
  color: #000;
}

/deep/.el-table__expanded-cell[class*="cell"] {
  padding: 0px 50px;
}

.header {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-family: PingFang SC;
  font-weight: bold;
  color: #333333;
  padding-bottom: 10px;
}

.inquiry {
  background: #fff;
  padding: 10px 20px 10px 20px;
  border-radius: 5px;
  .el-form {
    margin-top: 10px;
  }
}
.inquiryTab {
  background: #fff;
  padding: 10px 20px 20px 20px;
  border-radius: 5px;
  .el-form {
    margin-top: 10px;
  }
  margin-top: 20px;
}

/deep/.el-table__expand-icon > .el-icon {
  color: transparent;
}

.selectDate {
  display: inline-block;
  margin-right: 20px;

  span {
    display: inline-block;
    font-size: 15px;
    margin-right: 15px;
    vertical-align: middle;
  }

  .picker {
    display: inline-block;
    vertical-align: middle;
  }

  /deep/.el-input__inner {
    width: 250px;
    height: 28px;
    line-height: 28px;
  }

  /deep/ .el-date-editor .el-range__icon {
    line-height: 23px;
  }

  /deep/ .el-date-editor .el-range-separator {
    line-height: 23px;
  }

  /deep/.el-date-editor .el-range__close-icon {
    line-height: 22px;
  }
}

.table {
  margin-top: 10px;
  border: 1px solid #e8eaec;
  border-radius: 0;
  /deep/ .el-input--suffix .el-input__inner {
    background: #409eff;
    color: #fff;
    width: 104px;
    box-shadow: none;
  }

  /deep/ .el-button {
    padding: 10px 13px;
  }
}

/deep/.el-table thead {
  color: #2d7edf;
  text-align: center;

  .cell {
    text-align: center;
  }
}

.operation {
  display: inline-block;
  margin-left: 20px;

  img {
    width: 20px;
    height: 20px;
  }
}

/deep/.el-table td,
.el-table th {
  text-align: center;
}

.page {
  text-align: right;
  width: 100%;
  background: #f5f5f5;
  padding-right: 30px;
  position: fixed;
  bottom: 0px;
  right: 0px;
  z-index: 5;

  span {
    font-size: 14px;
    color: #666;
    display: inline-block;
    margin-left: 10px;
  }

  .el-pagination {
    display: inline-block;
    vertical-align: middle;
  }
}

.demo-table-expand {
  font-size: 0;
}

.demo-table-expand label {
  width: 200px;
  color: #99a9bf;
}

.demo-table-expand .el-form-item {
  margin-right: 0;
  margin-bottom: 0;
  width: 50%;
  text-align: left;
}

/deep/.el-table__row:hover {
  color: rgb(45, 125, 223);
}

/deep/.el-dialog__header {
  padding: 20px 20px 20px 20px;
  border-bottom: 1px solid #d9d9d9;
  font-family: PingFang SC;
  font-weight: bold;
  line-height: 25px;
  color: #333333;
}
/deep/.el-dialog {
  border-radius: 10px;
}
/deep/.el-dialog__headerbtn {
  top: 15px;
}

/deep/.el-dialog__headerbtn .el-dialog__close {
}
.headerbox {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  border-bottom: 1px solid #ededed;
  padding-bottom: 10px;
}
.title_left {
  width: 4px;
  height: 16px;
  background: #4c81eb;
  opacity: 1;
  margin-right: 10px;
}
.tabTitle {
  font-size: 18px;
  font-family: PingFang SC;
  font-weight: 400;
  line-height: 25px;
  color: #333333;
  opacity: 1;
  margin-top: 10px;
  margin-bottom: 20px;
}
.headerTitle {
  font-size: 18px;
  font-family: PingFang SC;
  font-weight: 400;
  color: #333333;
  opacity: 1;
  margin-top: 20px;
  margin-bottom: 15px;
}
/deep/.el-form-item__label {
  font-size: 14px;
  font-family: PingFang SC;
  font-weight: 400;
  color: #333333;
}
/deep/.vxe-cell--title {
  font-size: 14px;
  font-family: PingFang SC;
  font-weight: bold;
  color: #333333;
}
.red {
  color: #ff0000;
}
.green {
  color: #67c23a;
}
.gray {
  color: #666666;
}
/deep/.el-input.is-disabled .el-input__inner {
  background-color: #fff;
  font-family: PingFang SC;
  font-weight: 400;
  color: #333333;
}
/deep/ .el-dialog__footer {
  border-top: 1px solid #d9d9d9;
  margin-top: -20px;
  padding-top: 20px;
}
/deep/.el-table thead {
  font-size: 16px;
  font-family: PingFang SC;
  font-weight: bold;
  line-height: 22px;
  color: #333333;
  opacity: 1;
}
.greenStatus {
  /deep/.el-input__inner {
    color: #67c23a !important;
  }
}
.redStatus {
  /deep/.el-input__inner {
    color: #ff0000 !important;
  }
}
.grayStatus {
  /deep/.el-input__inner {
    color: #666666 !important;
  }
}
</style>
